Skip to content

Conversation

@ales-otf
Copy link
Contributor

@ales-otf ales-otf commented Sep 4, 2025

Description

  • introduce transaction rate limits for hyperparams updates
  • introduce freeze window for hyperparams updates (10 last blocks of the epoch by default, during which noone, including root, can update hyperparams)
  • add ensure function equivalents (ensure root, sn owner, owner-or-root) with the transaction rate limiting checks
  • add extrinsics to configure the update rate limit and the freeze window

Related Issue(s)

  • Closes #[issue number]

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Other (please describe):

Breaking Change

any attempt to set a hyperparameter via the freeze window will be blocked even for the root. the default value is the last 10 blocks of the epoch.

Checklist

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have run cargo fmt and cargo clippy to ensure my code is formatted and linted correctly
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

Screenshots (if applicable)

Please include any relevant screenshots or GIFs that demonstrate the changes made.

Additional Notes

Please provide any additional information or context that may be helpful for reviewers.

@ales-otf ales-otf self-assigned this Sep 4, 2025
@ales-otf ales-otf added the skip-cargo-audit This PR fails cargo audit but needs to be merged anyway label Sep 5, 2025
@ales-otf ales-otf marked this pull request as ready for review September 5, 2025 13:13
@ales-otf
Copy link
Contributor Author

ales-otf commented Sep 9, 2025

btcli tests failures are expected. the tests are updated in this pr

@ales-otf ales-otf force-pushed the feat/hyperparams-set-rate-limit branch from 894bacf to 125a65a Compare September 9, 2025 14:27
gztensor
gztensor previously approved these changes Sep 9, 2025
sam0x17
sam0x17 previously approved these changes Sep 9, 2025
@ales-otf ales-otf dismissed stale reviews from sam0x17 and gztensor via f8a2609 September 9, 2025 15:23
@basfroman
Copy link
Collaborator

btcli tests failures are expected. the tests are updated in this pr

btcli fix PR opentensor/btcli#620 (review)

@sam0x17 sam0x17 merged commit bcc1c10 into devnet-ready Sep 10, 2025
104 of 126 checks passed
@ales-otf ales-otf deleted the feat/hyperparams-set-rate-limit branch September 11, 2025 10:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip-cargo-audit This PR fails cargo audit but needs to be merged anyway

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants